home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / graphics / gnuplot / term / hp2648.trm < prev    next >
Text File  |  1993-09-15  |  2KB  |  125 lines

  1. /*
  2.  * $Id: hp2648.trm%v 3.50 1993/07/09 05:35:24 woo Exp $
  3.  *
  4.  */
  5.  
  6. /* GNUPLOT -  hp2648.trm */
  7. /*
  8.  * Copyright (C) 1990 - 1993   
  9.  *
  10.  * Permission to use, copy, and distribute this software and its
  11.  * documentation for any purpose with or without fee is hereby granted, 
  12.  * provided that the above copyright notice appear in all copies and 
  13.  * that both that copyright notice and this permission notice appear 
  14.  * in supporting documentation.
  15.  *
  16.  * Permission to modify the software is granted, but not the right to
  17.  * distribute the modified code.  Modifications are to be distributed 
  18.  * as patches to released version.
  19.  *  
  20.  * This software  is provided "as is" without express or implied warranty.
  21.  * 
  22.  * This file is included by ../term.c.
  23.  *
  24.  * This terminal driver supports:
  25.  *  HP2648 and HP2647
  26.  *
  27.  * AUTHORS
  28.  *  Russell Lang
  29.  * 
  30.  * send your comments or suggestions to (info-gnuplot@dartmouth.edu).
  31.  * 
  32.  */
  33.  
  34. #define HP2648XMAX 720             
  35. #define HP2648YMAX 360
  36.  
  37. #define HP2648XLAST (HP2648XMAX - 1)
  38. #define HP2648YLAST (HP2648YMAX - 1)
  39.  
  40. #define HP2648VCHAR        12      
  41. #define HP2648HCHAR        7        
  42. #define HP2648VTIC        8
  43. #define HP2648HTIC        8
  44.  
  45.  
  46. HP2648init()
  47. {
  48.     fprintf(outfile,"\033*m1m1n136,1cZ");
  49. /*                   1     2 3     4
  50.     1. mode
  51.     2. textsize=1
  52.     3. textangle=1
  53.         4. define line type 2 to be *   *   *   * etc.
  54. */
  55. }
  56.  
  57.  
  58. HP2648graphics()
  59. {
  60.     fprintf(outfile,"\033*dacZ");
  61. /*                   1     23
  62.     1. mode
  63.     2. clear grahics screen
  64.     3. graphics video on
  65. */
  66. }
  67.  
  68.  
  69. HP2648text()
  70. {
  71. }
  72.  
  73.  
  74. HP2648linetype(linetype)
  75. int linetype;
  76. {
  77.     static int hpline[] = {1,7,1,4,5,6,8,9,10,7,2};
  78.     fprintf(outfile,"\033*m%dbZ",hpline[(linetype+2)%11]);
  79. }
  80.  
  81.  
  82. HP2648move(x,y)
  83. int x,y;
  84. {
  85.     fprintf(outfile,"\033*paf%d,%dZ",x,y);
  86.     /*               1     23     4
  87.     1    plot mode
  88.     2    "pen up"
  89.     3    goto absolute x,y
  90.     4    end command
  91.     */
  92. }
  93.  
  94.  
  95. HP2648vector(x,y)
  96. int x,y;
  97. {
  98.     fprintf(outfile,"\033*pbf%d,%dZ",x,y);
  99.     /*                     1 
  100.     1    "pen down"
  101.     */
  102. }
  103.  
  104.  
  105. HP2648put_text(x,y,str)
  106. int x, y;
  107. char *str;
  108. {
  109.     HP2648move(x,y-HP2648VCHAR/2 + 1);
  110.     fprintf(outfile,"\033*l%s\n",str);
  111. }
  112.  
  113.  
  114. int HP2648_text_angle(ang)
  115. int ang;
  116. {
  117.     fprintf(outfile,"\033*m%dnZ\n",ang+1);
  118.     return TRUE;
  119. }
  120.     
  121. HP2648reset()
  122. {
  123. }
  124.  
  125.